package learn.filter;

import org.apache.shiro.session.mgt.SessionManager;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;
import org.springframework.web.context.support.WebApplicationObjectSupport;

import javax.annotation.Resource;
import javax.servlet.*;
import java.io.IOException;

/**
 * @author 吴宇亮 on 2019/12/20 0020 上午 9:21
 */
public class MyFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {
//        System.out.println("MyFilter init...");
    }

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
//        String url = request.getParameter("url");
//        System.out.println("MyFilter doFilter..." + url);
        chain.doFilter(request, response);
    }

    @Override
    public void destroy() {
//        System.out.println("MyFilter destroy...");
    }
}
